<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('')" />
</head>
<body class="white-bg">
	<div class="row">
		<div class="col-md-6">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>工单信息</h5>
				</div>
				<div class="ibox-content">
					<div class="table-responsive">
						<form class="form-horizontal m" id="form-workOrder-add">
							<div class="form-group">
								<label class="col-sm-3 control-label">工单类型：</label>
								<div class="col-sm-8">
									<select name="workorderType" class="form-control m-b" th:with="type=${@commdict.getDictList('sys_dict_data,dict_value,dict_label,dict_type=semicolonwork_order_typesemicolon and dict_value=semicolon2semicolon')}" required  readonly="readonly">
					              		<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${dict.dictValue==2}"></option>
					                </select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">衡器：</label>
								<div class="col-sm-8" th:with="dictCode=${'womp_weighing_apparatus,code,name,code='''+waCode+''''}">
									<select name="waCode" class="form-control m-b" th:with="type=${@commdict.getDictList(dictCode)}" required readonly="readonly">
		                        		<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
		                    		</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">巡检类型：</label>
								<div class="col-sm-8">
									<select name="osiType" class="form-control m-b" th:with="type=${@commdict.getDictList('sys_dict_data,dict_value,dict_label,dict_type=semicolonsys_osi_typesemicolon and dict_value=semicolon'+osiType+'semicolon')}" required readonly="readonly">
		                        		<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${dict.dictValue==osiType}"></option>
		                    		</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label is-required">工单负责人：</label>
								<div class="col-sm-8">
									<select name="osiUser" class="form-control m-b" th:with="type=${@commdict.getDictList('sys_user,login_name,user_name,login_name!=semicolonadminsemicolon')}" required>
		                        		<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
		                    		</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label is-required">指导建议：</label>
								<div class="col-sm-8">
									<textarea name="handlingOpinions" rows="5" class="form-control" required></textarea>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<th:block th:include="include :: footer" />
	<script th:inline="javascript">
		var alarmMap = [[${alarmMap}]];
		var prefix = ctx + "realtime"
		$("#form-workOrder-add").validate({
			focusCleanup : true
		});

		function submitHandler() {
			if ($.validate.form()) {
				$.operate.save(prefix + "/saveOsiWorkorder", $('#form-workOrder-add')
						.serialize());
			}
		}
	</script>
</body>
</html>